import csv
import logging
from logging import config

from faker import Faker

#加载配置文件
config.fileConfig("resources/config/log.conf")
#获取日志输出
logger = logging.getLogger()

like_host = "http://127.0.0.1:8081"

faker = Faker("zh_CN")
def getCsvData(path):
    with (open(path, mode="r", encoding="utf-8") as case):
        # 读取csv文件
        csvReader = csv.reader(case)
        caselist = []
        # 如果需要索引，可以使用enumerate
        for index, row in enumerate(csvReader, start=1):
            if index > 1:  # 如果需要跳过标题行
                caselist.append(row)
        return caselist